﻿using System.Data;
using ContractManagermentSystem.DataAccess;
using ContractManagermentSystem.Entity;

namespace ContractManagermentSystem.Business
{
    public class ContractTypeBus
    {
        private readonly ContractTypeDao _contractTypeDao;

        public ContractTypeBus()
        {
            _contractTypeDao = new ContractTypeDao();
        }

        public DataTable LoadAllContractType()
        {
            return _contractTypeDao.LoadAllContractType();
        }

        public DataTable GetContractTypeById(ContractType contractType)
        {
            return _contractTypeDao.GetContractTypeById(contractType);
        }

        public void CreateContractType(ContractType contractType)
        {
            _contractTypeDao.CreateContractType(contractType);
        }

        public int CheckContractTypeName(string contractTypeName)
        {
            return _contractTypeDao.CheckContractTypeName(contractTypeName);
        }

        public void SetIsActiveContractType(ContractType contractType)
        {
            _contractTypeDao.SetIsActiveContractType(contractType);
        }

        public void UpdateContractType(ContractType contractType)
        {
            _contractTypeDao.UpdateContractType(contractType);
        }

        public void DeleteContractType(ContractType contractType)
        {
            _contractTypeDao.DeleteContractType(contractType);
        }
    }
}
